﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Teigha.DatabaseServices;

namespace Com.OpenCode.DwgConvert.Model
{
    /// <summary>
    /// dwg版本对应表
    /// </summary>
    public static class DwgVersionUtils
    {
        /// <summary>
        /// DwgVersion转换成dwg发行版本描述
        /// </summary>
        /// <param name="dwgVersion"></param>
        /// <returns></returns>
        public static string DwgVersionToString(DwgVersion dwgVersion)
        {
            switch (dwgVersion)
            {
                case DwgVersion.AC1015:
                    return "AutoCAD 2000";
                case DwgVersion.AC1021:
                    return "AutoCAD 2007";
                case DwgVersion.AC1024:
                    return "AutoCAD 2010";
                case DwgVersion.AC1027:
                    return "AutoCAD 2013";
                default:
                    return "其他版本";
            }
        }

        /// <summary>
        /// DwgVersion转换成dwg发行版本描述
        /// </summary>
        /// <param name="dwgVersion"></param>
        /// <returns></returns>
        public static string DwgVersionToString(int dwgVersion)
        {
            DwgVersion version = (DwgVersion)dwgVersion;
            return (DwgVersionToString(version));
        }
    }
}
